package com.xgkj.diyiketang.activity;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.RatingBar;
import android.widget.TextView;

import com.xgkj.diyiketang.util.PalLog;
import com.xgkj.diyiketang.R;

/**
 * Created by XCKJ_Paladowow on 2016/4/12.
 */
public class SellerPingLunActivity extends BaseActivity {
    private Context mContext;
    private TextView back;
    private RatingBar ratingbar = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.seller_pinglun);
        mContext =this;
        initView();
    }

    private void initView(){
        back = (TextView) findViewById(R.id.back);
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        ratingbar = (RatingBar)findViewById(R.id.ratingbar_seller);
        ratingbar.setOnRatingBarChangeListener(new RatingBarListener());
    }

    class RatingBarListener implements RatingBar.OnRatingBarChangeListener{

        @Override
        public void onRatingChanged(RatingBar ratingBar, float rating,
                                    boolean fromUser) {
            // TODO Auto-generated method stub
            ratingBar.setRating(rating);
        }

    }
}
